typedef struct NODE {
    size_t id;
    //void* memloc;
    off_t off;
    size_t size;
    struct NODE * next;
} node_t;

typedef struct LIST {
    node_t * first;
    node_t * last;
} list_t;

int addnode(list_t * list, size_t val, size_t size, off_t off);
void clearlist(list_t * list);
node_t * findbyval(list_t * list, size_t val);
node_t * findbysize(list_t * list, size_t size);
int delnode(list_t * list, node_t * node);
